package com.stores.v1.model;

import com.stores.v1.entity.Person;
import com.stores.v1.entity.SiteAdmin;
import com.stores.v1.toolset.DatabaseInitializationException;

public class SiteAdminModel extends PersonModel {

	/***
	 * 
	 * @param userContext
	 */
	public SiteAdminModel(SiteAdmin userContext) {
		super.setUserContext(userContext);
	}

	@Override
	public void setUserContext(Person userContext) {
	}

	/**
	 * 
	 */
	public int createUser(Person user) throws DatabaseInitializationException,
			DatabaseTransactionException, AccessControlException,
			DatabaseCommandException {
		int userId = 0;		
		// full access for site admin - no access check		
		userId = this.createPerson(user, this.getGroupIdByPerson(user));
		return userId;
	}
}
